﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using SystemModels;

namespace SystemDALInterface
{
    /// <summary>
    /// 用户管理接口
    /// </summary>
    public interface IUserManager
    {
        /// <summary>
        /// 用户是否存在,返回用户对象
        /// </summary>
        /// <param name="userId">用户名</param>
        /// <param name="pwd">密码</param>
        /// <returns>返回用户对象</returns>
        Users CheckUser(int userId, String pwd);
        /// <summary>
        /// 张琪 
        /// 查询所有的用户信息
        /// </summary>
        /// <returns>用户集合</returns>

        /*
        List<Users> GetAllUsers();
        /// <summary>
        /// 张琪 删除用户
        /// </summary>
        /// <param name="userId">userId 用户id</param>
        /// <returns>int 受影响的行数</returns>
        int DeleteUser(int userId);
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="userName">userName 用户名</param>
        /// <param name="pwd">pwd 密码</param>
        /// <returns>int 受影响的行数</returns>
        int AddUser(string userName, string pwd);
        /// <summary>
        /// 根据用户名查询用户信息
        /// </summary>
        /// <param name="userName">userName 用户名</param>
        /// <returns>Users 用户</returns>
        Users QueryUserByName(string userName);
        /// <summary>
        /// 修改用户姓名
        /// </summary>
        /// <param name="userId">userName</param>
        /// <param name="userName">返回Int</param>
        /// <returns></returns>
        int ChangeUserName(int userId, string userName);
        /// <summary>
        /// 根据用户ID，修改用户密码
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <param name="pwd">用户密码</param>
        /// <returns>受影响的行数</returns>
        int ChangeUserPwd(int userId, string pwd);
        /// <summary>
        /// 修改用户状态
        /// </summary>
        /// <param name="user">用户</param>
        /// <returns>bool</returns>
         */
        bool ChangeUser(Users user);
         
    }
}
